export default {
	async login({
		commit,
		state
	}, {
		zip = '+86',
		username = '',
		phoneValid = '',
		pushRegister = '',
		source = '',
		monitor_name = '',
		platform,
		openId,
		fromApp = false
	}) {
		const res = await userApi.login({
			zip,
			username,
			phoneValid,
			pushRegister,
			source,
			monitor_name,
			platform,
			openId,
			fromApp
		})
		commit('setToken', res.accessToken)
		return res.accessToken
	}
}